<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    var str = 'qwer'
    var num = -1
    var res = 0
    var flag = NaN
    var item = ''
    var test = '0'
    var arg = ' '

    // false: 5 0 NaN '' null undefined

    console.log( Boolean(str) )  // true
    console.log( Boolean(num) )  // true
    console.log( Boolean(res) )  // false
    console.log( Boolean(flag) )  // false
    console.log( Boolean(item) )  // false
    console.log( Boolean(test) )  // true
    console.log( Boolean(arg) )  // true
  </script>
</body>
</html>